package com.yaodian100.ec.payment.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * 申请提现
 * 
 * @author feeling.wang
 * 
 */
@Entity
@Table(name = "EC_APPLY_CASH_OUT")
public class ApplyCashOut extends BaseEntity {

	private static final long serialVersionUID = 394969644807983988L;

	/**
	 * 提现单号
	 */
	@Id
	@GeneratedValue(generator = "ec_apply_cash_out_seq")
	@GenericGenerator(name = "ec_apply_cash_out_seq", strategy = "com.yaodian100.core.common.dao.hibernate.SeqStringGenerator", parameters = {
			@Parameter(name = "sequence", value = "ec_apply_cash_out_seq"),
			@Parameter(name = "pattern", value = "CA0000000000") })
	@Column(name = "ID", length = 12, nullable = false)
	private String id;

	/**
	 * 会员编号
	 */
	@Column(name = "MEMBER_ID", length = 10, nullable = false)
	private String memberId;

	/**
	 * 提现方式(目前只有邮汇) 1. 邮局汇款 2. 银行汇款
	 */
	@Column(name = "CASH_OUT_TYPE", length = 1, nullable = false)
	private String cashOutType;

	/**
	 * 收款者姓名
	 */
	@Column(name = "RECEIVER_NAME", length = 20)
	private String receiverName;

	/**
	 * 收款者地址
	 */
	@Column(name = "RECEIVER_ADDRESS", length = 100)
	private String receiverAddress;

	/**
	 * 省
	 */
	@Column(name = "RECEIVER_PROVINCE", length = 20)
	private String receiverProvince;

	/**
	 * 城市
	 */
	@Column(name = "RECEIVER_CITY", length = 20)
	private String receiverCity;

	/**
	 * 地区
	 */
	@Column(name = "RECEIVER_DISTRICT", length = 20)
	private String receiverDistrict;

	/**
	 * 收款者邮递区号
	 */
	@Column(name = "RECEIVER_ZIP_CODE", length = 10)
	private String receiverZipCode;

	/**
	 * 提现人银行名称
	 */
	@Column(name = "RECEIVER_BANK_NAME", length = 50)
	private String receiverBankName;

	/**
	 * 提现人银行户名
	 */
	@Column(name = "RECEIVER_BANK_ACCOUNT_NAME", length = 30)
	private String receiverBankAccountName;

	/**
	 * 提现人银行帐号
	 */
	@Column(name = "RECEIVER_BANK_ACCOUNT_NUMBER", length = 30)
	private String receiverBankAccountNumber;

	/**
	 * 申请日期时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "APPLY_DATE", nullable = false)
	private Date applyDate;

	/**
	 * 申请提现金额
	 */
	@Column(name = "APPLY_AMOUNT", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal applyAmount;

	/**
	 * 提现手续费
	 */
	@Column(name = "FEE", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal fee;

	/**
	 * 实际提现金额
	 */
	@Column(name = "ACTUAL_CASH_OUT_AMOUNT", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal actualCashOutAmount;

	/**
	 * 申请状态 10:申请中 80:提现成功 90:提现失败
	 */
	@Column(name = "CASH_OUT_STATUS", nullable = false, length = 2)
	private String cashOutStatus;

	/**
	 * 备注
	 */
	@Column(name = "CASH_OUT_MEMO", length = 100)
	private String cashOutMemo;

	/**
	 * 會員姓名
	 */
	@Column(name = "MEMBER_NAME", length = 100)
	private String memberName;

	 /**
	 * 財會核可日期
	 */
	 @Temporal(TemporalType.TIMESTAMP)
	 @Column(name = "APPROVE_DATE")
	 private Date approveDate;

	public BigDecimal getActualCashOutAmount() {
		return actualCashOutAmount;
	}

	public BigDecimal getApplyAmount() {
		return applyAmount;
	}

	public Date getApplyDate() {
		return applyDate;
	}

	public String getCashOutMemo() {
		return cashOutMemo;
	}

	public String getCashOutStatus() {
		return cashOutStatus;
	}

	public String getCashOutType() {
		return cashOutType;
	}

	public BigDecimal getFee() {
		return fee;
	}

	public String getId() {
		return id;
	}

	public String getMemberId() {
		return memberId;
	}

	public String getReceiverAddress() {
		return receiverAddress;
	}

	public String getReceiverBankAccountName() {
		return receiverBankAccountName;
	}

	public String getReceiverBankAccountNumber() {
		return receiverBankAccountNumber;
	}

	public String getReceiverBankName() {
		return receiverBankName;
	}

	public String getReceiverCity() {
		return receiverCity;
	}

	public String getReceiverDistrict() {
		return receiverDistrict;
	}

	public String getReceiverName() {
		return receiverName;
	}

	public String getReceiverProvince() {
		return receiverProvince;
	}

	public String getReceiverZipCode() {
		return receiverZipCode;
	}

	public void setActualCashOutAmount(BigDecimal actualCashOutAmount) {
		this.actualCashOutAmount = actualCashOutAmount;
	}

	public void setApplyAmount(BigDecimal applyAmount) {
		this.applyAmount = applyAmount;
	}

	public void setApplyDate(Date applyDate) {
		this.applyDate = applyDate;
	}

	public void setCashOutMemo(String cashOutMemo) {
		this.cashOutMemo = cashOutMemo;
	}

	public void setCashOutStatus(String cashOutStatus) {
		this.cashOutStatus = cashOutStatus;
	}

	public void setCashOutType(String cashOutType) {
		this.cashOutType = cashOutType;
	}

	public void setFee(BigDecimal fee) {
		this.fee = fee;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public void setReceiverAddress(String receiverAddress) {
		this.receiverAddress = receiverAddress;
	}

	public void setReceiverBankAccountName(String receiverBankAccountName) {
		this.receiverBankAccountName = receiverBankAccountName;
	}

	public void setReceiverBankAccountNumber(String receiverBankAccountNumber) {
		this.receiverBankAccountNumber = receiverBankAccountNumber;
	}

	public void setReceiverBankName(String receiverBankName) {
		this.receiverBankName = receiverBankName;
	}

	public void setReceiverCity(String receiverCity) {
		this.receiverCity = receiverCity;
	}

	public void setReceiverDistrict(String receiverDistrict) {
		this.receiverDistrict = receiverDistrict;
	}

	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}

	public void setReceiverProvince(String receiverProvince) {
		this.receiverProvince = receiverProvince;
	}

	public void setReceiverZipCode(String receiverZipCode) {
		this.receiverZipCode = receiverZipCode;
	}

	public String getMemberName() {
		return memberName;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}

	 public Date getApproveDate() {
	 return approveDate;
	 }
	
	 public void setApproveDate(Date approveDate) {
	 this.approveDate = approveDate;
	 }

}